﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XeBus.Controller;

namespace XeBus
{
    public partial class frmIndex : Form
    {
        public frmIndex()
        {
            InitializeComponent();
        }

        private void dangNhapToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //this.Hide();

            frmDangNhap dn = new frmDangNhap();
            dn.ShowDialog();

            if (dn.lg == 1)
            {
                quanLyToolStripMenuItem.Visible = true;
                dangXuatToolStripMenuItem.Visible = true;
            }
            else
            {
                quanLyToolStripMenuItem.Visible = false;
                dangXuatToolStripMenuItem.Visible = false;
            }

            
        }

        private void thoatToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void thongTinTuyenXeBuytToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmThongTinTuyenXeBus txb = new frmThongTinTuyenXeBus();
            txb.ShowDialog();
        }

        private void dangXuatToolStripMenuItem_Click(object sender, EventArgs e)
        {
            quanLyToolStripMenuItem.Visible = false;
            dangXuatToolStripMenuItem.Visible = false;
        }

        private void thongTinTramDungToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTramDung td = new frmTramDung();
            td.ShowDialog();
        }


        private void loTrinhConDuongToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmLoTrinh_ConDuong LT_CD = new frmLoTrinh_ConDuong();
            LT_CD.ShowDialog();
        }

        private void timKiemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTimKiem tk = new frmTimKiem();
            tk.ShowDialog();
        }

        private void gioiThieuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmGioiThieu gt = new frmGioiThieu();
            gt.ShowDialog();
        }

    }
}
